
#include<iostream>
#include<vector>
using namespace std;


//指针向左移动step的步数
void left(vector<int>& a, int& i, int step)
{
	for (int k = 0; k < step;)
	{
		i--;   
		if (i == -1)i = a.size() - 1;
		if (a[i] != 0)k++;//有效移动
	}
}

void right(vector<int>& a, int& i, int step)
{
	for (int k = 0; k < step;)
	{
		i++;
		if (i == a.size())i = 0;
		if (a[i] != 0)k++;
	}
}

bool empty(const vector<int>&a)
{
	for (int i = 0; i < a.size(); i++)
	{
		if (a[i] != 0)return false;
	}
	return true;
}

int main()
{
	int n; cin >> n;
	vector<int>arr(n); 
	for (int i = 1; i <= n; i++)
		arr.push_back(i);
	int m, k; cin >> m >> k;
	m--; k--;
	bool reverse = true;
	int i = 0;
	while (!empty(arr))  
	{
		if (reverse)//逆时针
		{
			//指针左移m
			left(arr, i, m);
			cout << arr[i] << " ";
			arr[i] = 0;
			if (empty(arr))break;
			//指针移动到下一个位置
			left(arr, i, 1);
		}
		else
		{
			right(arr, i, k);
			cout << arr[i] << " ";
			arr[i] = 0;
			if (empty(arr))break;

			//指针移动到下一个位置
			right(arr, i, 1);   
		}
		reverse = !reverse;
	}

	return 0;
}
